package org.mall.modules.member.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.mall.common.constant.CommonConstant;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;

/**
 * @Auther: LL
 * @Date: 2019/11/18 13:33
 */
@Data
@TableName("sp_member")
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="sp_member对象", description="商城用户")
public class MemberPro {
    /**id*/
    @TableId(type = IdType.UUID)
    @ApiModelProperty(value = "id")
    private String id;
    /**用户名*/
    @NotBlank(message = "用户名不能为空")
    @Excel(name = "用户名", width = 15)
    @ApiModelProperty(value = "用户名")
    private String username;
    /**手机号*/
    @NotBlank(message = "手机号不能为空")
    @Pattern(regexp = CommonConstant.MOBILE_NUMBER_PATTERN,message = "手机号格式不正确")
    @Excel(name = "手机号", width = 15)
    @ApiModelProperty(value = "手机号")
    private String mobile;
    /**性别*/
    @Excel(name = "性别", width = 15)
    @ApiModelProperty(value = "性别")
    private Integer sex;
    /**微信openID*/
    @Excel(name = "微信openID", width = 15)
    @ApiModelProperty(value = "微信openID")
    private String wexinOpenId;
    /**createTime*/
    @Excel(name = "createTime", width = 20, format = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "createTime")
    private java.util.Date createTime;
    /**updateTime*/
    @Excel(name = "updateTime", width = 20, format = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "updateTime")
    private java.util.Date updateTime;
    /**password*/
    @Excel(name = "password", width = 15)
    @ApiModelProperty(value = "password")
    private String password;
    /**类型。  0 普通用户。1推广员*/
    @Excel(name = "类型。  0 普通用户。1推广员", width = 15)
    @ApiModelProperty(value = "类型。  0 普通用户。1推广员")
    private Integer type;
    /**身份证信息*/
    @Excel(name = "身份证信息", width = 15)
    @ApiModelProperty(value = "身份证信息")
    private String idCard;
    /**0 正常 1 冻结*/
    @Excel(name = "0 正常 1 冻结", width = 15)
    @ApiModelProperty(value = "0 正常 1 冻结")
    private Integer state;
    /**是否已被删除。 0 未删除 1删除*/
    @Excel(name = "是否已被删除。 0 未删除 1删除", width = 15)
    @ApiModelProperty(value = "是否已被删除。 0 未删除 1删除")
    private Integer isDelete;
    /**昵称*/
    @Excel(name = "昵称", width = 15)
    @ApiModelProperty(value = "昵称")
    private String nickName;
    /**真实姓名*/
    @Excel(name = "真实姓名", width = 15)
    @ApiModelProperty(value = "真实姓名")
    private String realName;

    private String imageUrl;

    private String code;
    private Integer promotionType;
    private String promotionNum;
}
